﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CanDoo.Core;
using CanDoo.Data;
using CanDoo.Contracts;
using CanDoo.Oil.Core.Models;
using CanDoo.Core.Data;
using CanDoo.Oil.Core.DTOs;

namespace CanDoo.Oil.Core.Contracts
{
    /// <summary>
    /// 业务契约——售油机序列号
    /// </summary>
    public interface IOilSalesSerialNumContract : IServiceBaseCore<OilSalesSerialNum>, IServiceBase<OilSalesSerialNum>
    {
        /// <summary>
        /// 新售油机接入门店时，门店与设备绑定
        /// </summary>
        /// <param name="deviceInfo">设备信息</param>
        /// <returns>操作结果</returns>
        Task<OperationResult> BindDeviceAsync(DeviceInfo deviceInfo);
        /// <summary>
        /// 获取1.1.2获取售油配置信息
        /// </summary>
        /// <param name="keyInfo">门店号,终端号</param>
        /// <returns>如果找不到信息,返回null</returns>
        Task<SellingConfigInfo> GetSellingConfigInfoAsync(TerminalKeyInfo keyInfo);

        /// <summary>
        /// 获取售油机信息 用于oauth认证
        /// </summary>
        /// <param name="clientId">机器条码</param>
        /// <param name="clientSecret">门店号</param>
        /// <returns></returns>
        Task<OilSalesSerialNum> GetByClientAsync(string clientId, string clientSecret);
        /// <summary>
        /// 获取售油机信息
        /// </summary>
        /// <param name="clientId">机器条码</param>
        /// <returns></returns>
        Task<OilSalesSerialNum> GetByClientAsync(string clientId);

        /// <summary>
        /// 1.1.16门店终端信息 根据门店和终端编号，获取终端信息
        /// </summary>
        /// <param name="terminalKeyInfo"></param>
        /// <returns></returns>
        Task<TerminalInfo> GetTerminalInfoAsync(TerminalKeyInfo terminalKeyInfo);

        Task<OilSalesSerialNum> GetByTerminalNoAsync(string terminalNo);
    }
}

